from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'rfinder.views.home', name='home'),
    # url(r'^rfinder/', include('rfinder.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    
    # User facing end points
    url(r'^buildings/?$', 'alpha.views.buildings'),
    url(r'^building/([A-Za-z0-9 ]+)/?$', 'alpha.views.building'),
    url(r'^room/([A-Za-z0-9 ]+)/([A-Za-z0-9 ]+)/?$', 'alpha.views.room'),
    url(r'^/?$', 'alpha.views.buildings'),
    url(r'^about/?$', 'alpha.views.about'),
    
    # API end points
    url(r'^api/buildings/?$', 'alpha.views.buildings_json'),
    url(r'^api/search/?$', 'alpha.views.search'),
)

urlpatterns += staticfiles_urlpatterns()